1. Field of the Invention
The present invention relates generally to the recording of data onto optical discs, and more particularly to a method for handling buffer under-runs during recording sessions.
2. Description of the Related Art
Optical disc storage of data offers relatively high capacity data storage (e.g., approximately 640 Megabytes) on a relatively small and inexpensive optical disc. Optical disc recording commonly involves recording (sometimes referred to as xe2x80x9cburningxe2x80x9d) several files of data on one or more spiral tracks on a optical disc, which can typically hold between 1 and 99 tracks. A file system (FS) is typically recorded at the beginning of a session and contains addressing information for the files, such as a volume descriptor sequence with address pointers to path tables indicating the file directory structure, and a directory descriptor indicating the file locations and logical block numbers. The volume descriptor sequence by convention (and in compliance with ISO standard 9660) is located in sector 16 (and sectors following sector 16 if needed) of the first track of a recording session. The ISO 9660 Specification (also referred to as the Information Processing-Volume and file structure of CD-ROM for information interchange) is hereby incorporated by reference.
When recording is desired, files of data to be recorded are typically retrieved from a hard disk drive, transferred to a faster access buffer memory, and the files on the buffer memory are continuously recorded onto one or more tracks of an optical disc during a recording session. However, as recording rates for optical discs increase beyond 4xc3x97(1xc3x97 being defined as normal music playback speed), the rate of recording onto the optical disc frequently exceeds the rate at which the hard drive data source can replenish data in the buffer memory. A buffer under-run occurs when the buffer memory is unable to continuously provide data for an uninterrupted recording of the files to a given track of the optical disc. Eventually, after the buffer under-run occurs, the burning stops. Typically, there is a pre-gap of 150 sectors and a post-gap of 150 sectors for a total gap of 300 sectors (approximately 700 kilobytes) between the end of one track and the beginning of another track. This gap between tracks causes file addressing problems, since the new addresses of the remaining files (which were recorded after the buffer under-run) are not accurately reflected in the FS recorded at the beginning of the session. As such, when a read of a particular file that was recorded after the buffer under-run is desired, the reading will access an incorrect file due to the gap. Furthermore, multiple buffer under-runs can occur during a recording session, depending on the access speed and transfer speed of the data retrieval from the hard drive data source, the size and read/write speed of the buffer memory, and the data transmission rate required for continuously recording data onto the optical disc.
The consequences of one or more buffer under-runs during recording on an optical disc depend on the type of optical disc used during the recording. A CD-R optical disc can only undergo one recording, and the inaccessible remaining files typically cause the CD-R optical disc to be scrapped and replaced by a fresh CD-R optical disc for a repeated recording. A CD-R/W optical disc can undergo several recording sessions, since the optical disc can be erased and the recording can be repeated. However, the repeating recording sessions can take considerable time, especially if the recording is of a large track. Furthermore, regardless of whether the optical disc is CD-R or CD-R/W, another buffer under-run can occur during the repeated recording session, causing the loss of the time spent on the recording session, if not the entire optical disc (in the case of CD-R optical discs).
FIG. 1A shows a prior art track 100 on an optical disc resulting from a recording session in which a buffer under-run has occurred. The file system (FS) 102 is recorded at the beginning of the track (which represents the beginning of a session) and then the data 104 recording follows, until stopped by the buffer under-run 106. The dotted lines indicate a missing remainder 108 of the data that would have been recorded in the track 100 if the buffer under-run had not occurred.
FIG. 1B shows a prior art track 100 on an optical disc resulting from a recording session in which a buffer under-run 106 has occurred, and the resulting difference created between a file address and the actual file address as the result of the buffer under-run. The FS 102 is recorded at the beginning of the track, and then the data 104 recording follows, until stopped by the buffer under-run 106. The remainder of the data 108 is recorded in track 2 after the buffer under-run 106. The FS 102, which was recorded before the buffer under-run 106 occurred, points to the address 112 represented as file Nxe2x80x2, shown by dotted lines. The FS 102 address assumes that the file Nxe2x80x2 is located in the first track 100, which is incorrect. The actual address 114 of file N, shown by solid lines, is in the second track 110 as a result of the buffer under-run 106.
Thus, the occurrence of a buffer under-run causes several problems in conventional recording systems. The recording of a track of one or more files is stopped, and a physical gap is created between the original track and a new track of remaining files recorded after the buffer under-run. The addresses of files recorded after a buffer under-run do not correspond to the addresses for the files as indicated by the FS that was recorded before the buffer under-run, because of the gap between the original track and the next track which records the remaining files. Since the addresses of the files recorded after a buffer under-run are incorrect, the entire recording must be repeated on another disc if the disc cannot be erased and rewritten. Otherwise, if the same disc can be erased and rewritten (e.g., CD R/W), the tracks made during the interrupted recording session must be erased and re-recorded. Additional time and cost is required by the duplicate recording session as a result of the buffer under-run in either case.
In view of the foregoing, there is a need for a method that can handle buffer under-runs during a recording session on an optical disc. This method should be configured to avoid the problems of the prior art.
The present invention fills these needs by providing methods that can handle buffer under-runs during a recording session on an optical disc. The invention is a method for maintaining the addressing accuracy of the file system of a recording session, regardless of multiple buffer under-runs that may occur during the recording session. The present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable media. Several embodiments of the present invention are described below.
In one embodiment, a method for handling buffer under-runs while recording data onto a disc during a recording session is disclosed. The method includes recording a volume descriptor sequence for the recording session, and recording the data for the recording session following the volume descriptor sequence. A track of the recording session is then closed upon an occurrence of a buffer under-run. The recording of the data then continues in a next track of the recording session. A file system is written following the data recorded in the next track, and the volume descriptor sequence has a pointer to the file system. This method further includes the operation of estimating the number of buffer under-runs, and adding a correction increment to define a location for the file system.
Of course, there can be any number of corrections (i.e., one for each anticipated buffer under-run), for example, up to 98 corrections during a session that writes 99 files. In this embodiment, the closing of the track operation and the recording the continuation of the data in the next track is repeated at the occurrence of any other buffer under-runs that may occur during the recording session before the writing of the file system. As such, when there is more than one buffer under-run the next track will represent a last track written for the recording session.
In another embodiment, a computer readable media having program instructions for handling buffer under-runs associated with the recording of one or more files on a disc is disclosed. The computer readable media includes: (a) program instructions for recording a volume descriptor sequence for the recording session; (b) program instructions for recording the data for the recording session following the volume descriptor sequence; (c) program instructions for closing a track of the recording session upon an occurrence of a buffer under-run; (d) program instructions for recording a continuation of the data in a next track of the recording session; and (e) program instructions for writing a file system following the data written in the next track, and the volume descriptor sequence having a pointer to the file system. Preferably, the closing of the track instruction and the recording the continuation of the data in the next track is repeated at the occurrence of any other buffer under-runs that may occur during the recording session before the writing of the file system instruction is performed, and when there is more than one buffer under-run the next track will represent a last track written for the recording session.
In yet another embodiment, a method for handling buffer under-runs is disclosed. The method includes recording the one or more files onto the disc, and then recording path tables and a directory descriptor of a file system. A volume descriptor sequence is recorded onto the disc either before or after the path tables and the directory descriptor are recorded onto the disc.
One benefit and advantage of the invention is higher recording throughput of finished and usable optical discs. Another benefit is faster turn-around time for recording a usable optical disc. An additional benefit is the reduction in the cost of scrapping incompletely recorded and unusable optical discs. Yet another benefit is an increased practicality of optical disc recording at a higher recording speed. It should be noted that the benefits buffer under-run handling of the present invention are equally applicable to the ISO 9660 standard, the Joliet CD-ROM Recording Specification, as wells as the Universal Disk Format (UDF) standard, which is a subset of ISO 13346. The Joliet CD-ROM Recording Specification and all UDF standards are hereby incorporated by reference. Of course, other standards that suffer from buffer under-runs may also benefit from the invention claimed herein.
Other advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.